From: Timo Tijhof Date: Thu, 20 Aug 2015 22:34:06 +0000 (+0200) Subject: resourceloader: Remove remoteBasePath from FileModule version hash X-Git-Tag: 1.31.0-rc.0~10331 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=6a78b4811df211b6ffe7607428fca745513a414e;p=lhc%2Fweb%2Fwiklou.git resourceloader: Remove remoteBasePath from FileModule version hash In Wikimedia production this tends to contain the branch name, which causes the version to change for no reason after a MediaWiki deployment. For example: ["remoteBasePath"]=> string(43) "https://test.wikipedia.org/static/1.26wmf19" Bug: T102578 Change-Id: I50b8afd72183cae875d4aaa0aaf0da4e7d664284 --- diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index efb151e346..3224b13523 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -591,9 +591,10 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { $options = array(); foreach ( array( - // T104950: Do not include localBasePath! That path may vary over time and needlessly - // invalidate cache. If the path changes in a way that makes relative file paths point - // to something else, getFileHashes() will incorporate that already. + // T104950: Do not include localBasePath or remoteBasePath! + // Those paths may vary over time and needlessly invalidate cache. If the path changes + // in a way that makes relative file paths point to something else, getFileHashes() will + // account for that already. 'scripts', 'debugScripts', 'loaderScripts', @@ -608,7 +609,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { 'group', 'position', 'skipFunction', - 'remoteBasePath', 'debugRaw', 'raw', ) as $member ) {